package com.ebraga.trackerclub.android.util.enumeration;

import java.util.ArrayList;
import java.util.List;

/**
 * Enumeration of configuration parameter names. 
 */
public enum AndroidConfigurationParameterName {

	//TODO: define all parameter names for android configuration
	LOGIN_OFFLINE_EXPIRE("LOGIN_OFFLINE_EXPIRE"),
	LOGIN_OFFLINE_AUTO("LOGIN_OFFLINE_AUTO"),
	POSITION_TIME("POSITION_TIME"),
	GPS_ACCEPTABLE_ACCURACY("GPS_ACCEPTABLE_ACCURACY"),
	SYNC_OFFSET_IN_MINUTES("SYNC_OFFSET_IN_MINUTES"),
	VERSION_APP("VERSION_APP"),
	BANNER_ENABLED("BANNER_ENABLED");
	
	private final String parameterName;
	
	private AndroidConfigurationParameterName(String parameterName) {
		this.parameterName = parameterName;
	}
	
	/**
	 * Returns all parameter names used on Android configuration. 
	 * @return a list of parameter names.
	 */
	public static List<String> getAllParameterNames() {
		List<String> parameterNames = new ArrayList<String>();
		AndroidConfigurationParameterName[] values = AndroidConfigurationParameterName.values();
		for(AndroidConfigurationParameterName value :values) {
			parameterNames.add(value.parameterName);
		}
		
		return parameterNames;
	}
	
	/**
	 * Returns the parameter name.
	 * @return parameter name.
	 */
	public String getName(){
		return parameterName;
	}
	
}
